
<?php 
if($mode== "ADD"){

	?>
			<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading"> LOCATION MANAGEMENT ( ADD LOCATION<!-- UNDER WEST BENGAL -->  )  <span class="pull-right"><a href="<?= base_url();?>secure/location/location_management" type="button" class="btn btn-success btn-sm">Back to StateList</a></span></header>
					<div class="panel-body">
						<form class="form-horizontal" role="form"
						name="add_location" method="post"
				action="<?= base_url();?>secure/location/location_management/insert_state">
                                  <?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">State Name</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="state_name" name="state_name" placeholder="State Name">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Url</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="url" name="url" placeholder="State Url">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Title</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="meta_title" name="meta_title" placeholder="Meta Title">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Keyword</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_keyword" id="meta_keyword" class="form-control" rows="3"></textarea>
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Description</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_description" id="meta_description" class="form-control" rows="3"></textarea>
                                      </div>
                                  </div>
                                  
                                 <!--  <div class="form-group">
                                  		<label for="input" class="col-lg-2 control-label">Include in Top Location</label>	
                                      <div class="col-lg-10">
                                            <input name="sample-radio" id="radio-01" value="1" type="radio" > Yes
                                            <input name="sample-radio" id="radio-02" value="1" type="radio" checked="checked"> No
                                             
                                       </div>
                                  </div>
                                   -->
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                      <input type="submit" class="btn btn-info" value="Save Location" <?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
                                      </div>
                                  </div>        
                                  
                                  
                              </form>
					</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>

<?php }?>
<?php 
if($mode=="EDIT"){
	?>
	<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading"> LOCATION MANAGEMENT ( ADD LOCATION<!-- UNDER WEST BENGAL -->  )  <span class="pull-right"><a href="<?= base_url();?>secure/location/location_management" type="button" class="btn btn-success btn-sm">Back to StateList</a></span></header>
					<div class="panel-body">
						<form class="form-horizontal" role="form"
						name="add_location" method="post"
				action="<?= base_url();?>secure/location/location_management/update_state">
                                  <?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">State Name</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="state_name" name="state_name" value="<?= $state['info']->statename;?> " placeholder="State Name">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Url</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="url" name="url"
								value="<?= $state['info']->url;?> " placeholder="State Url">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Title</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="meta_title" 
                                         name="meta_title" value="<?= $state['info']->meta_title;?>" placeholder="Meta Title">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Keyword</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_keyword" id="meta_keyword" class="form-control" rows="3">
                                         <?= $state['info']->meta_keyword;?>
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Description</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_description" id="meta_description" class="form-control" rows="3">
                                          <?= $state['info']->meta_description;?>
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                 <!--  <div class="form-group">
                                  		<label for="input" class="col-lg-2 control-label">Include in Top Location</label>	
                                      <div class="col-lg-10">
                                            <input name="sample-radio" id="radio-01" value="1" type="radio" > Yes
                                            <input name="sample-radio" id="radio-02" value="1" type="radio" checked="checked"> No
                                             
                                       </div>
                                  </div> -->
                                  
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                       <input type="hidden"
									name="state_id" value="<?= $state['info']->id;?>">
                                      <input type="submit" class="btn btn-info" name="insert" value="Update State" <?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
                                      </div>
                                  </div>        
                                  
                                  
                              </form>
					</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>
<?php }?>
<?php 
if($mode== "CITY ADD"){

	?>
	
<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading"> LOCATION MANAGEMENT ( ADD CITY<!-- UNDER WEST BENGAL -->  )  <span class="pull-right"><a href="<?= base_url();?>secure/location/location_management/viewcity/<?= $state_id;?>" type="button" class="btn btn-success btn-sm">Back to CityList</a></span></header>
					<div class="panel-body">
						<form class="form-horizontal" role="form"
						name="add_location" method="post"
				action="<?= base_url();?>secure/location/location_management/insert_city">
                                  <?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">City Name</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="city_name" name="city_name" placeholder="City Name">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Url</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="url" name="url"
								 placeholder="State Url">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Title</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="meta_title" 
                                         name="meta_title" placeholder="Meta Title">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Keyword</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_keyword" id="meta_keyword" class="form-control" rows="3">
                                         
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Description</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_description" id="meta_description" class="form-control" rows="3">
                                         
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                <!--   <div class="form-group">
                                  		<label for="input" class="col-lg-2 control-label">Include in Top Location</label>	
                                      <div class="col-lg-10">
                                            <input name="sample-radio" id="radio-01" value="1" type="radio" > Yes
                                            <input name="sample-radio" id="radio-02" value="1" type="radio" checked="checked"> No
                                             
                                       </div>
                                  </div>
                                   -->
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                       <input type="hidden"
									name="state_id" value="<?= $state_id;?>">
									
									   <input type="hidden"
									name="state_code" value="<?= $state_code;?>">
									
                                      <input type="submit" class="btn btn-info" name="insert" value="Add City" <?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
                                      </div>
                                  </div>        
                                  
                                  
                              </form>
					</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>	
<?php }?>

<?php 
if($mode=="CITY EDIT"){
	?>
	<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading"> LOCATION MANAGEMENT ( EDIT CITY<!-- UNDER WEST BENGAL -->  )  <span class="pull-right"><a href="<?= base_url();?>secure/location/location_management/viewcity/<?= $state_id;?>" type="button" class="btn btn-success btn-sm">Back to CityList</a></span></header>
					<div class="panel-body">
						<form class="form-horizontal" role="form"
						name="add_location" method="post"
				action="<?= base_url();?>secure/location/location_management/update_city">
                                  <?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">City Name</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="state_name" name="city_name" value="<?= $city['info']->cityname;?> " placeholder="State Name">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Url</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" 
                                          id="url" name="url"
								value="<?= $city['info']->url;?>" placeholder="State Url">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Title</label>
                                      <div class="col-lg-8">
                                          <input type="text" class="form-control" id="meta_title" 
                                         name="meta_title" value="<?= $city['info']->meta_title;?>"  placeholder="Meta Title">
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Keyword</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_keyword" id="meta_keyword" class="form-control" rows="3">
                                         <?= $city['info']->meta_keyword;?>
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                  <div class="form-group">
                                      <label for="input" class="col-lg-2 control-label">Meta Description</label>
                                      <div class="col-lg-8">
                                          <textarea name="meta_description" id="meta_description" class="form-control" rows="3">
                                         <?= $city['info']->meta_description;?>
                                          </textarea>
                                      </div>
                                  </div>
                                  
                                <!--   <div class="form-group">
                                  		<label for="input" class="col-lg-2 control-label">Include in Top Location</label>	
                                      <div class="col-lg-10">
                                            <input name="sample-radio" id="radio-01" value="1" type="radio" > Yes
                                            <input name="sample-radio" id="radio-02" value="1" type="radio" checked="checked"> No
                                             
                                       </div>
                                  </div>
                                   -->
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                       <input type="hidden"
									name="city_id" value="<?= $city['info']->id;?>"> <input
									type="hidden" name="state_id"
									value="<?= $city['info']->stateid;?>">
                                      <input type="submit" class="btn btn-info" name="insert" value="Update City" <?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
                                      </div>
                                  </div>        
                                  
                                  
                              </form>
					</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>
<?php }?>	